@geexcode/geex-angular 0.0.15 → 0.0.17

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/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import { WritableSignal, Injector, InjectionToken, Provider } from '@angular/core';
2
- import { Observable } from 'rxjs';
1
+ import { WritableSignal, Signal, Injector, InjectionToken, Provider } from '@angular/core';
3
2
 
4
3
  interface Tenant {
5
4
  /** Unique identifier */
@@ -107,7 +106,7 @@ interface UiModule extends GeexModule {
107
106
  /** Whether the app is currently in fullscreen mode */
108
107
  fullScreen: WritableSignal<boolean>;
109
108
  /** Responsive helper stream notifying if device is mobile-like */
110
- isMobile$: Observable<boolean>;
109
+ isMobile: Signal<boolean | undefined>;
111
110
  /** Currently active routed component (framework dependent) */
112
111
  activeRoutedComponent?: any;
113
112
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { WritableSignal, Injector, InjectionToken, Provider } from '@angular/core';
2
- import { Observable } from 'rxjs';
1
+ import { WritableSignal, Signal, Injector, InjectionToken, Provider } from '@angular/core';
3
2
 
4
3
  interface Tenant {
5
4
  /** Unique identifier */
@@ -107,7 +106,7 @@ interface UiModule extends GeexModule {
107
106
  /** Whether the app is currently in fullscreen mode */
108
107
  fullScreen: WritableSignal<boolean>;
109
108
  /** Responsive helper stream notifying if device is mobile-like */
110
- isMobile$: Observable<boolean>;
109
+ isMobile: Signal<boolean | undefined>;
111
110
  /** Currently active routed component (framework dependent) */
112
111
  activeRoutedComponent?: any;
113
112
  }
package/dist/index.js CHANGED
@@ -59,6 +59,7 @@ var import_util = require("@delon/util");
59
59
  var import_graphql_tag = __toESM(require("graphql-tag"));
60
60
  var import_rxjs = require("rxjs");
61
61
  var import_operators = require("rxjs/operators");
62
+ var import_rxjs_interop = require("@angular/core/rxjs-interop");
62
63
  var LoginProviderEnum = {
63
64
  Local: "Local"
64
65
  };
@@ -66,10 +67,10 @@ var OrgTypeEnum = {
66
67
  Default: "Default"
67
68
  };
68
69
  var GQL_CHECK_TENANT = import_graphql_tag.default`mutation checkTenant($code: String!) { checkTenant(code: $code) { id code name isEnabled createdOn } }`;
69
- var GQL_FEDERATE_AUTH = import_graphql_tag.default`mutation federateAuthenticate($code: String!, $loginProvider: LoginProviderEnum!) { federateAuthenticate(code: $code, loginProvider: $loginProvider) { ...UserDetail } }`;
70
+ var GQL_FEDERATE_AUTH = import_graphql_tag.default`mutation federateAuthenticate($code: String!, $loginProvider: LoginProviderEnum!) { federateAuthenticate(code: $code, loginProvider: $loginProvider) { id orgs { code name allParentOrgs { id orgType code name parentOrgCode } } isEnable permissions orgCodes roleIds roleNames loginProvider } }`;
70
71
  var GQL_ON_PUBLIC_NOTIFY = import_graphql_tag.default`subscription onPublicNotify { onPublicNotify { __typename ... on DataChangeClientNotify { dataChangeType } } }`;
71
- var GQL_ORGS_CACHE = import_graphql_tag.default`query orgsCache { orgs(take: 999) { items { ... OrgCacheItem } } }`;
72
- var GQL_INIT_SETTINGS = import_graphql_tag.default`query initSettings { initSettings { ... SettingBrief } }`;
72
+ var GQL_ORGS_CACHE = import_graphql_tag.default`query orgsCache { orgs(take: 999) { items { id orgType code name parentOrgCode } } }`;
73
+ var GQL_INIT_SETTINGS = import_graphql_tag.default`query initSettings { initSettings { id name value } }`;
73
74
  function createTenantModule(injector) {
74
75
  const current = (0, import_core.signal)(null);
75
76
  return {
@@ -174,13 +175,13 @@ function createSettingsModule(injector) {
174
175
  }
175
176
  function createUiModule(injector) {
176
177
  const fullScreenSignal = (0, import_core.signal)(false);
177
- const isMobile$ = (0, import_rxjs.fromEvent)(window, "resize").pipe(
178
+ const isMobile = (0, import_rxjs_interop.toSignal)((0, import_rxjs.fromEvent)(window, "resize").pipe(
178
179
  (0, import_operators.debounceTime)(200),
179
180
  (0, import_operators.switchMap)(async () => window.innerHeight / window.innerWidth >= 1.5)
180
- );
181
+ ));
181
182
  return {
182
183
  fullScreen: fullScreenSignal,
183
- isMobile$,
184
+ isMobile,
184
185
  activeRoutedComponent: void 0
185
186
  };
186
187
  }
package/dist/index.mjs CHANGED
@@ -14,6 +14,7 @@ import { CookieService, deepCopy } from "@delon/util";
14
14
  import gql from "graphql-tag";
15
15
  import { firstValueFrom, map, fromEvent } from "rxjs";
16
16
  import { debounceTime, switchMap } from "rxjs/operators";
17
+ import { toSignal } from "@angular/core/rxjs-interop";
17
18
  var LoginProviderEnum = {
18
19
  Local: "Local"
19
20
  };
@@ -21,10 +22,10 @@ var OrgTypeEnum = {
21
22
  Default: "Default"
22
23
  };
23
24
  var GQL_CHECK_TENANT = gql`mutation checkTenant($code: String!) { checkTenant(code: $code) { id code name isEnabled createdOn } }`;
24
- var GQL_FEDERATE_AUTH = gql`mutation federateAuthenticate($code: String!, $loginProvider: LoginProviderEnum!) { federateAuthenticate(code: $code, loginProvider: $loginProvider) { ...UserDetail } }`;
25
+ var GQL_FEDERATE_AUTH = gql`mutation federateAuthenticate($code: String!, $loginProvider: LoginProviderEnum!) { federateAuthenticate(code: $code, loginProvider: $loginProvider) { id orgs { code name allParentOrgs { id orgType code name parentOrgCode } } isEnable permissions orgCodes roleIds roleNames loginProvider } }`;
25
26
  var GQL_ON_PUBLIC_NOTIFY = gql`subscription onPublicNotify { onPublicNotify { __typename ... on DataChangeClientNotify { dataChangeType } } }`;
26
- var GQL_ORGS_CACHE = gql`query orgsCache { orgs(take: 999) { items { ... OrgCacheItem } } }`;
27
- var GQL_INIT_SETTINGS = gql`query initSettings { initSettings { ... SettingBrief } }`;
27
+ var GQL_ORGS_CACHE = gql`query orgsCache { orgs(take: 999) { items { id orgType code name parentOrgCode } } }`;
28
+ var GQL_INIT_SETTINGS = gql`query initSettings { initSettings { id name value } }`;
28
29
  function createTenantModule(injector) {
29
30
  const current = signal(null);
30
31
  return {
@@ -129,13 +130,13 @@ function createSettingsModule(injector) {
129
130
  }
130
131
  function createUiModule(injector) {
131
132
  const fullScreenSignal = signal(false);
132
- const isMobile$ = fromEvent(window, "resize").pipe(
133
+ const isMobile = toSignal(fromEvent(window, "resize").pipe(
133
134
  debounceTime(200),
134
135
  switchMap(async () => window.innerHeight / window.innerWidth >= 1.5)
135
- );
136
+ ));
136
137
  return {
137
138
  fullScreen: fullScreenSignal,
138
- isMobile$,
139
+ isMobile,
139
140
  activeRoutedComponent: void 0
140
141
  };
141
142
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geexcode/geex-angular",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "Angular adapter for Geex core.",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs",