@tuki-io/tuki-widgets 0.0.194 → 0.0.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/di2mt/shared/components/stat-card/stat-card.component.mjs +4 -4
- package/esm2020/di2mt/widgets/upgrade-overview/cards/pending-activation-users/pending-activation-users.component.mjs +1 -2
- package/esm2020/user-creation/src/interfaces/user-creation-wizard.interfaces.mjs +1 -1
- package/esm2020/user-creation/src/shared/components/notification/notification.component.mjs +5 -7
- package/esm2020/user-creation/src/shared/services/user-creation-api.service.mjs +3 -2
- package/esm2020/user-creation/src/utils/device-name-validation.mjs +23 -0
- package/esm2020/user-creation/src/utils/parse-device-name-rule.mjs +26 -0
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.mjs +102 -19
- package/esm2020/user-creation/src/widgets/user-creation-wizard/components/user-overview-step/user-overview-step.component.mjs +3 -3
- package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.mjs +13 -3
- package/esm2020/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.mjs +105 -16
- package/esm2020/users-list/src/users-list.component.mjs +6 -3
- package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs +4 -4
- package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs +288 -63
- package/fesm2015/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +5 -2
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs +3 -4
- package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs +277 -60
- package/fesm2020/tuki-io-tuki-widgets-user-creation.mjs.map +1 -1
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +5 -2
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -1
- package/package.json +1 -1
- package/user-creation/src/interfaces/user-creation-wizard.interfaces.d.ts +19 -0
- package/user-creation/src/shared/services/user-creation-api.service.d.ts +2 -2
- package/user-creation/src/utils/device-name-validation.d.ts +6 -0
- package/user-creation/src/utils/parse-device-name-rule.d.ts +8 -0
- package/user-creation/src/widgets/user-creation-wizard/components/user-details-step/user-details-step.component.d.ts +8 -0
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.component.d.ts +2 -0
- package/user-creation/src/widgets/user-creation-wizard/user-creation-wizard.service.d.ts +14 -0
- package/esm2020/user-creation/src/utils/validation.mjs +0 -14
- package/user-creation/src/utils/validation.d.ts +0 -4
|
@@ -877,14 +877,14 @@ class StatCardComponent {
|
|
|
877
877
|
return Math.ceil(this.stats?.totalUpgraded / this.stats?.total * 100);
|
|
878
878
|
}
|
|
879
879
|
get pendingActivationPercentage() {
|
|
880
|
-
return Math.ceil(this.stats?.
|
|
880
|
+
return Math.ceil(this.stats?.totalUpgraded / this.stats?.pendingActivation * 100);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
883
|
StatCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StatCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
884
|
-
StatCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: StatCardComponent, selector: "tk-stat-card", inputs: { title: "title", type: "type", readinessStats: "readinessStats", upgradeStatus: "upgradeStatus" }, ngImport: i0, template: "<tk-card [title]=\"title\">\r\n <ng-container ngProjectAs=\"card-content\">\r\n <div class=\"card__content-info\">\r\n <div class=\"card__content-wrapper\">\r\n <img width=\"42\" [src]=\"'assets/icons/' + type + '.png'\" alt=\"\" />\r\n <div class=\"card__content-text\">\r\n <ng-container *ngIf=\"upgradeStatus === 'ready' || upgradeStatus === 'already'\">\r\n <div class=\"card__content-label\">\r\n {{ upgradeStatus === 'ready' ? stats?.totalReady : stats?.totalUpgraded }}\r\n {{ type === 'user' ? 'Users' : 'Sites' }}</div>\r\n <div class=\"card__content-description\">{{ upgradeStatus === 'ready' ? 'Ready to Upgrade' : 'Already Upgraded' }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"upgradeStatus === 'pending'\">\r\n <div class=\"card__content-label\">\r\n {{ stats?.pendingActivation }}\r\n {{ 'User' }}</div>\r\n <div class=\"card__content-description\">{{ 'Ready to activate' }}</div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card__content-progress-wrapper\">\r\n <ng-container *ngIf=\"upgradeStatus === 'ready' || upgradeStatus === 'already'\">\r\n <div class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ readyPercentage }}%</span>\r\n <span>From all {{ stats?.total }} {{ type === 'user' ? 'users' : 'sites' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.already]=\"upgradeStatus === 'already'\"\r\n [style.width.%]=\"readyPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"upgradeStatus === 'already'\" class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ upgradedPercentage }}%</span>\r\n <span>From all {{ stats?.totalReady }} ready {{ type === 'user' ? 'users' : 'sites' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.already]=\"upgradeStatus === 'already'\"\r\n [style.width.%]=\"upgradedPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"upgradeStatus === 'pending'\">\r\n <div class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ pendingActivationPercentage }}%</span>\r\n <span>From all {{ stats?.totalUpgraded }} {{ 'upgraded users' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.pending-activation]=\"upgradeStatus === 'pending'\"\r\n [style.width.%]=\"pendingActivationPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</tk-card>\r\n", styles: [":host{display:block;height:100%;box-sizing:border-box}.card__content-info{display:flex;align-items:center;justify-content:space-between}.card__content-text{display:flex;flex-direction:column;gap:.25rem}.card__content-text .card__content-label{font-size:20px}.card__content-text .card__content-description{font-size:12px}.card__content-wrapper{display:flex;align-items:center;justify-content:center;gap:1rem}.card__content-wrapper:first-child{display:flex;gap:.5rem}.card__content-progress-wrapper{display:flex;flex-direction:column;gap:1rem}.card__content-progress{display:flex;flex-direction:column;gap:.25rem;font-size:14px}.card__content-progress .card__content-progress-label{display:flex;align-items:center;justify-content:space-between;padding:.05rem}.card__content-progress .card__content-progress-bar{background-color:#ededed;border-radius:10rem}.card__content-progress .card__content-progress-bar .card__content-progress-bar-fill{height:10px;border-radius:inherit}.ready{background-color:#0a78cc}.already{background-color:#16a693}.pending-activation{background-color:#ddbf45}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CardComponent, selector: "tk-card", inputs: ["title"] }] });
|
|
884
|
+
StatCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: StatCardComponent, selector: "tk-stat-card", inputs: { title: "title", type: "type", readinessStats: "readinessStats", upgradeStatus: "upgradeStatus" }, ngImport: i0, template: "<tk-card [title]=\"title\">\r\n <ng-container ngProjectAs=\"card-content\">\r\n <div class=\"card__content-info\">\r\n <div class=\"card__content-wrapper\">\r\n <img width=\"42\" [src]=\"'assets/icons/' + type + '.png'\" alt=\"\" />\r\n <div class=\"card__content-text\">\r\n <ng-container *ngIf=\"upgradeStatus === 'ready' || upgradeStatus === 'already'\">\r\n <div class=\"card__content-label\">\r\n {{ upgradeStatus === 'ready' ? stats?.totalReady : stats?.totalUpgraded }}\r\n {{ type === 'user' ? 'Users' : 'Sites' }}</div>\r\n <div class=\"card__content-description\">{{ upgradeStatus === 'ready' ? 'Ready to Upgrade' : 'Already Upgraded' }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"upgradeStatus === 'pending'\">\r\n <div class=\"card__content-label\">\r\n {{ stats?.pendingActivation }}\r\n {{ 'User' }}</div>\r\n <div class=\"card__content-description\">{{ 'Ready to activate' }}</div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card__content-progress-wrapper\">\r\n <ng-container *ngIf=\"upgradeStatus === 'ready' || upgradeStatus === 'already'\">\r\n <div class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ readyPercentage }}%</span>\r\n <span>From all {{ stats?.total }} {{ type === 'user' ? 'users' : 'sites' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.already]=\"upgradeStatus === 'already'\"\r\n [style.width.%]=\"readyPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"upgradeStatus === 'already'\" class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ upgradedPercentage }}%</span>\r\n <span>From all {{ stats?.totalReady }} ready {{ type === 'user' ? 'users' : 'sites' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.already]=\"upgradeStatus === 'already'\"\r\n [style.width.%]=\"upgradedPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"upgradeStatus === 'pending'\">\r\n <div class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ pendingActivationPercentage }}%</span>\r\n <span>From all {{ stats?.totalUpgraded }} {{ 'upgraded users' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\" style=\"overflow: hidden;\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.pending-activation]=\"upgradeStatus === 'pending'\"\r\n [style.width.%]=\"pendingActivationPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</tk-card>\r\n", styles: [":host{display:block;height:100%;box-sizing:border-box}.card__content-info{display:flex;align-items:center;justify-content:space-between}.card__content-text{display:flex;flex-direction:column;gap:.25rem}.card__content-text .card__content-label{font-size:20px}.card__content-text .card__content-description{font-size:12px}.card__content-wrapper{display:flex;align-items:center;justify-content:center;gap:1rem}.card__content-wrapper:first-child{display:flex;gap:.5rem}.card__content-progress-wrapper{display:flex;flex-direction:column;gap:1rem}.card__content-progress{display:flex;flex-direction:column;gap:.25rem;font-size:14px}.card__content-progress .card__content-progress-label{display:flex;align-items:center;justify-content:space-between;padding:.05rem}.card__content-progress .card__content-progress-bar{background-color:#ededed;border-radius:10rem}.card__content-progress .card__content-progress-bar .card__content-progress-bar-fill{height:10px;border-radius:inherit}.ready{background-color:#0a78cc}.already{background-color:#16a693}.pending-activation{background-color:#ddbf45}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CardComponent, selector: "tk-card", inputs: ["title"] }] });
|
|
885
885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StatCardComponent, decorators: [{
|
|
886
886
|
type: Component,
|
|
887
|
-
args: [{ selector: 'tk-stat-card', template: "<tk-card [title]=\"title\">\r\n <ng-container ngProjectAs=\"card-content\">\r\n <div class=\"card__content-info\">\r\n <div class=\"card__content-wrapper\">\r\n <img width=\"42\" [src]=\"'assets/icons/' + type + '.png'\" alt=\"\" />\r\n <div class=\"card__content-text\">\r\n <ng-container *ngIf=\"upgradeStatus === 'ready' || upgradeStatus === 'already'\">\r\n <div class=\"card__content-label\">\r\n {{ upgradeStatus === 'ready' ? stats?.totalReady : stats?.totalUpgraded }}\r\n {{ type === 'user' ? 'Users' : 'Sites' }}</div>\r\n <div class=\"card__content-description\">{{ upgradeStatus === 'ready' ? 'Ready to Upgrade' : 'Already Upgraded' }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"upgradeStatus === 'pending'\">\r\n <div class=\"card__content-label\">\r\n {{ stats?.pendingActivation }}\r\n {{ 'User' }}</div>\r\n <div class=\"card__content-description\">{{ 'Ready to activate' }}</div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card__content-progress-wrapper\">\r\n <ng-container *ngIf=\"upgradeStatus === 'ready' || upgradeStatus === 'already'\">\r\n <div class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ readyPercentage }}%</span>\r\n <span>From all {{ stats?.total }} {{ type === 'user' ? 'users' : 'sites' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.already]=\"upgradeStatus === 'already'\"\r\n [style.width.%]=\"readyPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"upgradeStatus === 'already'\" class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ upgradedPercentage }}%</span>\r\n <span>From all {{ stats?.totalReady }} ready {{ type === 'user' ? 'users' : 'sites' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.already]=\"upgradeStatus === 'already'\"\r\n [style.width.%]=\"upgradedPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"upgradeStatus === 'pending'\">\r\n <div class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ pendingActivationPercentage }}%</span>\r\n <span>From all {{ stats?.totalUpgraded }} {{ 'upgraded users' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.pending-activation]=\"upgradeStatus === 'pending'\"\r\n [style.width.%]=\"pendingActivationPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</tk-card>\r\n", styles: [":host{display:block;height:100%;box-sizing:border-box}.card__content-info{display:flex;align-items:center;justify-content:space-between}.card__content-text{display:flex;flex-direction:column;gap:.25rem}.card__content-text .card__content-label{font-size:20px}.card__content-text .card__content-description{font-size:12px}.card__content-wrapper{display:flex;align-items:center;justify-content:center;gap:1rem}.card__content-wrapper:first-child{display:flex;gap:.5rem}.card__content-progress-wrapper{display:flex;flex-direction:column;gap:1rem}.card__content-progress{display:flex;flex-direction:column;gap:.25rem;font-size:14px}.card__content-progress .card__content-progress-label{display:flex;align-items:center;justify-content:space-between;padding:.05rem}.card__content-progress .card__content-progress-bar{background-color:#ededed;border-radius:10rem}.card__content-progress .card__content-progress-bar .card__content-progress-bar-fill{height:10px;border-radius:inherit}.ready{background-color:#0a78cc}.already{background-color:#16a693}.pending-activation{background-color:#ddbf45}\n"] }]
|
|
887
|
+
args: [{ selector: 'tk-stat-card', template: "<tk-card [title]=\"title\">\r\n <ng-container ngProjectAs=\"card-content\">\r\n <div class=\"card__content-info\">\r\n <div class=\"card__content-wrapper\">\r\n <img width=\"42\" [src]=\"'assets/icons/' + type + '.png'\" alt=\"\" />\r\n <div class=\"card__content-text\">\r\n <ng-container *ngIf=\"upgradeStatus === 'ready' || upgradeStatus === 'already'\">\r\n <div class=\"card__content-label\">\r\n {{ upgradeStatus === 'ready' ? stats?.totalReady : stats?.totalUpgraded }}\r\n {{ type === 'user' ? 'Users' : 'Sites' }}</div>\r\n <div class=\"card__content-description\">{{ upgradeStatus === 'ready' ? 'Ready to Upgrade' : 'Already Upgraded' }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"upgradeStatus === 'pending'\">\r\n <div class=\"card__content-label\">\r\n {{ stats?.pendingActivation }}\r\n {{ 'User' }}</div>\r\n <div class=\"card__content-description\">{{ 'Ready to activate' }}</div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card__content-progress-wrapper\">\r\n <ng-container *ngIf=\"upgradeStatus === 'ready' || upgradeStatus === 'already'\">\r\n <div class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ readyPercentage }}%</span>\r\n <span>From all {{ stats?.total }} {{ type === 'user' ? 'users' : 'sites' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.already]=\"upgradeStatus === 'already'\"\r\n [style.width.%]=\"readyPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"upgradeStatus === 'already'\" class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ upgradedPercentage }}%</span>\r\n <span>From all {{ stats?.totalReady }} ready {{ type === 'user' ? 'users' : 'sites' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.already]=\"upgradeStatus === 'already'\"\r\n [style.width.%]=\"upgradedPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"upgradeStatus === 'pending'\">\r\n <div class=\"card__content-progress\">\r\n <div class=\"card__content-progress-label\">\r\n <span>{{ pendingActivationPercentage }}%</span>\r\n <span>From all {{ stats?.totalUpgraded }} {{ 'upgraded users' }}</span>\r\n </div>\r\n <div class=\"card__content-progress-bar\" style=\"overflow: hidden;\">\r\n <div\r\n class=\"card__content-progress-bar-fill ready\"\r\n [class.pending-activation]=\"upgradeStatus === 'pending'\"\r\n [style.width.%]=\"pendingActivationPercentage\"\r\n ></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</tk-card>\r\n", styles: [":host{display:block;height:100%;box-sizing:border-box}.card__content-info{display:flex;align-items:center;justify-content:space-between}.card__content-text{display:flex;flex-direction:column;gap:.25rem}.card__content-text .card__content-label{font-size:20px}.card__content-text .card__content-description{font-size:12px}.card__content-wrapper{display:flex;align-items:center;justify-content:center;gap:1rem}.card__content-wrapper:first-child{display:flex;gap:.5rem}.card__content-progress-wrapper{display:flex;flex-direction:column;gap:1rem}.card__content-progress{display:flex;flex-direction:column;gap:.25rem;font-size:14px}.card__content-progress .card__content-progress-label{display:flex;align-items:center;justify-content:space-between;padding:.05rem}.card__content-progress .card__content-progress-bar{background-color:#ededed;border-radius:10rem}.card__content-progress .card__content-progress-bar .card__content-progress-bar-fill{height:10px;border-radius:inherit}.ready{background-color:#0a78cc}.already{background-color:#16a693}.pending-activation{background-color:#ddbf45}\n"] }]
|
|
888
888
|
}], propDecorators: { title: [{
|
|
889
889
|
type: Input
|
|
890
890
|
}], type: [{
|
|
@@ -2231,7 +2231,6 @@ class PendingActivationUsersCardComponent {
|
|
|
2231
2231
|
.subscribe(({ summary, pendingActivation }) => {
|
|
2232
2232
|
this.readinessStats = {
|
|
2233
2233
|
...summary,
|
|
2234
|
-
totalUpgradedUsers: 1,
|
|
2235
2234
|
pendingActivation
|
|
2236
2235
|
};
|
|
2237
2236
|
this.loading = false;
|