migrate alert-box in lib, up route airwatch demo layout
This commit is contained in:
parent
fe63fec58f
commit
d0b5ad10f6
15 changed files with 174 additions and 9 deletions
22
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
22
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
|
@ -0,0 +1,22 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="7">
|
||||
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
||||
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
||||
<item index="2" class="java.lang.String" itemvalue="comment" />
|
||||
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
||||
<item index="4" class="java.lang.String" itemvalue="embed" />
|
||||
<item index="5" class="java.lang.String" itemvalue="script" />
|
||||
<item index="6" class="java.lang.String" itemvalue="Placeholder" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/ng-implementation.iml" filepath="$PROJECT_DIR$/.idea/ng-implementation.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
10
.idea/ng-implementation.iml
generated
Normal file
10
.idea/ng-implementation.iml
generated
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/ng-demo" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
34
.idea/php.xml
generated
Normal file
34
.idea/php.xml
generated
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpCodeSniffer">
|
||||
<phpcs_settings>
|
||||
<phpcs_by_interpreter asDefaultInterpreter="true" interpreter_id="53af92f2-01ab-44d1-b456-ef2235475a50" timeout="30000" />
|
||||
</phpcs_settings>
|
||||
</component>
|
||||
<component name="PhpStan">
|
||||
<PhpStan_settings>
|
||||
<phpstan_by_interpreter asDefaultInterpreter="true" interpreter_id="53af92f2-01ab-44d1-b456-ef2235475a50" timeout="60000" />
|
||||
</PhpStan_settings>
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="Psalm">
|
||||
<Psalm_settings>
|
||||
<psalm_fixer_by_interpreter asDefaultInterpreter="true" interpreter_id="53af92f2-01ab-44d1-b456-ef2235475a50" timeout="60000" />
|
||||
</Psalm_settings>
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
7
.idea/vcs.xml
generated
Normal file
7
.idea/vcs.xml
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/sae-airwatch" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
0
blueprint/README.md
Normal file
0
blueprint/README.md
Normal file
|
@ -43,6 +43,7 @@
|
|||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "~2.1.0",
|
||||
"sae-lib": "file:../my-workspace/projects/sae-lib",
|
||||
"ng-packagr": "^20.1.0",
|
||||
"typescript": "~5.8.2",
|
||||
"typescript-eslint": "8.34.1"
|
||||
|
|
1
my-workspace/projects/sae-lib/.npmrc
Normal file
1
my-workspace/projects/sae-lib/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
prefix=/home/tykayn/.npm-global
|
|
@ -1,14 +1,16 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {NgClass} from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-alert-box',
|
||||
imports: [
|
||||
],
|
||||
selector: 'sae-alert-box',
|
||||
imports: [],
|
||||
templateUrl: './alert-box.html',
|
||||
styleUrl: './alert-box.scss'
|
||||
})
|
||||
export class AlertBox {
|
||||
@Input() public message = "";
|
||||
|
||||
@Input() public _alertKind = "warning";
|
||||
|
||||
get alertKind(): string {
|
||||
return this._alertKind;
|
||||
}
|
||||
|
@ -16,7 +18,5 @@ export class AlertBox {
|
|||
set alertKind(value: string) {
|
||||
this._alertKind = value;
|
||||
}
|
||||
@Input() public _alertKind: string = "warning";
|
||||
@Input() public message: string = "";
|
||||
|
||||
}
|
||||
|
|
7
my-workspace/projects/sae-lib/buttons/copy/copy.html
Normal file
7
my-workspace/projects/sae-lib/buttons/copy/copy.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<button class="button copy" (click)="copy()">
|
||||
<i class="ri-file-copy-2-fill"></i>
|
||||
<span class="label">
|
||||
Copy
|
||||
</span>
|
||||
</button>
|
||||
|
0
my-workspace/projects/sae-lib/buttons/copy/copy.scss
Normal file
0
my-workspace/projects/sae-lib/buttons/copy/copy.scss
Normal file
23
my-workspace/projects/sae-lib/buttons/copy/copy.spec.ts
Normal file
23
my-workspace/projects/sae-lib/buttons/copy/copy.spec.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { Copy } from './copy';
|
||||
|
||||
describe('Copy', () => {
|
||||
let component: Copy;
|
||||
let fixture: ComponentFixture<Copy>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [Copy]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(Copy);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
54
my-workspace/projects/sae-lib/buttons/copy/copy.ts
Normal file
54
my-workspace/projects/sae-lib/buttons/copy/copy.ts
Normal file
|
@ -0,0 +1,54 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-copy',
|
||||
imports: [],
|
||||
templateUrl: './copy.html',
|
||||
styleUrl: './copy.scss'
|
||||
})
|
||||
export class Copy {
|
||||
|
||||
@Input() textToCopy = "";
|
||||
|
||||
copy() {
|
||||
this.copyTextToClipboard(this.textToCopy)
|
||||
}
|
||||
|
||||
fallbackCopyTextToClipboard(text: any) {
|
||||
var textArea = document.createElement("textarea");
|
||||
textArea.value = text;
|
||||
|
||||
// Avoid scrolling to bottom
|
||||
textArea.style.top = "0";
|
||||
textArea.style.left = "0";
|
||||
textArea.style.position = "fixed";
|
||||
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
var successful = document.execCommand('copy');
|
||||
var msg = successful ? 'successful' : 'unsuccessful';
|
||||
console.log('Fallback: Copying text command was ' + msg);
|
||||
} catch (err) {
|
||||
console.error('Fallback: Oops, unable to copy', err);
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
}
|
||||
|
||||
copyTextToClipboard(text: string) {
|
||||
console.log("copier", text)
|
||||
if (!navigator.clipboard) {
|
||||
this.fallbackCopyTextToClipboard(text);
|
||||
return;
|
||||
}
|
||||
navigator.clipboard.writeText(text).then(function () {
|
||||
console.log('Async: Copying to clipboard was successful!');
|
||||
}, function (err) {
|
||||
console.error('Async: Could not copy text: ', err);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
|
@ -38,7 +38,6 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 1000;
|
||||
|
||||
}
|
||||
|
||||
.feedback-modal {
|
||||
|
|
1
ng-demo
1
ng-demo
|
@ -1 +0,0 @@
|
|||
Subproject commit 6f5cfc7fd66a143c55f7541e4bbb5b6625e6a8f8
|
Loading…
Add table
Add a link
Reference in a new issue